import type {RecursiveRequired, Settings} from '#/global'
import settingsDefault from '@/settings.default'
import {merge} from '@/utils/object'
import {cloneDeep} from 'es-toolkit'

const globalSettings: Settings.all = {
  "app": {
    "enablePermission": true,
    "enableDynamicTitle": true
  },
  "menu": {
    "mode": "single"
  },
  "tabbar": {
    "enable": true,
    "enableIcon": true
  },
  "toolbar": {
    "navSearch": false,
    "fullscreen": true,
    "pageReload": true,
    "colorScheme": true
  },
  "mainPage": {
    "enableHotkeys": false
  }
}

export default merge(globalSettings, cloneDeep(settingsDefault)) as RecursiveRequired<Settings.all>
